<% representations = current_user.represented.unshift(current_user) - [current_subject] %>

<% if representations.present? %>
  <li class="dropdown-submenu pull-left">
    <%= link_to t('representation.switch'), "#", tabindex: "-1" %>
    <ul class="dropdown-menu dropdown-menu-header">
      <% representations.each do |representation| %>
      <li>
      <%= link_to({ :s => representation.slug }, 'data-toggle' => 'tooltip', 'data-placement' => 'left', :title => representation.name, 'data-original-title' => representation.name) do %>
          <%= image_tag representation.logo.url(:small) %>
          <%= truncate_name(representation.name, :length => 15) %>
        <% end %>
      </li>
      <% end %>
    </ul>
  </li>
<% end %> 
